// JavaScript Document
xmlHttp = ajaxFunction();

function ajaxFunction () {
	var xmlHttp;
	try {
		//Firefox, Opera, Safari browsers
		xmlHttp = new XMLHttpRequest();
	} catch(e) {
		try {
			//Internet Explorer 6.0+
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				//Internet Explorer 5.5+
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				//No AJAX Support
				alert("Your browser does not support AJAX!");
				return false;
			}
		}
	}
	return xmlHttp;
}

xmlHttp.onreadystatechange = function() {
	if(xmlHttp.readyState == 4) {
		// Get the data and do something
		document.myForm.time.value = xmlHttp.responseText;
	}
}